﻿using System;
using System.Collections.Generic;

namespace Twofolders
{
    public class FolderPair
    {
        public string Name { get; set; }

        public string SourceDirectory { get; set; }

        public string DestinationDirectory { get; set; }

        public bool ShouldDeleteFromDestination { get; set; }

        public FolderPair(string name, string source, string destination, bool toDelete)
        {
            Name = name;
            SourceDirectory = source;
            DestinationDirectory = destination;
            ShouldDeleteFromDestination = toDelete;
        }

        static internal FolderPair GetByName(List<FolderPair> folderPairs, string name)
        {
            foreach (var folderPair in folderPairs)
            {
                if (folderPair.Name == name) return folderPair;
            }

            return null;
        }
    }
}
